package br.com.escolaespacocrianca.fineec.model;

import java.util.Date;
import java.util.List;

import javax.persistence.Entity;
import javax.persistence.OneToMany;

import org.hibernate.annotations.Cascade;
import org.hibernate.annotations.CascadeType;

import br.com.escolaespacocrianca.fineec.model.enums.ExtraServiceType;

@Entity
public class ExtraService extends BaseEntity {
	
	private Date entryDate;
	private ExtraServiceType type;
	private String description; 
	private Double price;
	private Integer numberOfPlots;
	
	@OneToMany
	@Cascade(value={CascadeType.SAVE_UPDATE})
	private List<Plot> plots;


	public Date getEntryDate() {
		return entryDate;
	}

	public void setEntryDate(Date entryDate) {
		this.entryDate = entryDate;
	}

	public ExtraServiceType getType() {
		return type;
	}

	public void setType(ExtraServiceType type) {
		this.type = type;
	}

	public String getDescription() {
		return description;
	}

	public void setDescription(String description) {
		this.description = description;
	}

	public List<Plot> getPlots() {
		return plots;
	}

	public void setPlots(List<Plot> plots) {
		this.plots = plots;
	}

	public Double getPrice() {
		return price;
	}

	public void setPrice(Double price) {
		this.price = price;
	}

	public Integer getNumberOfPlots() {
		return numberOfPlots;
	}

	public void setNumberOfPlots(Integer numberOfPlots) {
		this.numberOfPlots = numberOfPlots;
	}
	
}
